import socket

client = socket.socket()
client.connect(('localhost', 8000))
msg = input('>>')
client.send(msg.encode('utf8'))
recv_data = client.recv(1024)
print(recv_data.decode('utf8'))